<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title></title>
   	<script src="../../resources/jquery-1.8.3.js"></script>
   	<script type="text/javascript">
   	
     function getTicket(){	
    	 alert(111);
        var token = $(":input[name='token']").val()  ;
        var url="https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token="+token;
        var dataq = '{\"action_name\": \"QR_LIMIT_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"123\"}}}';
        alert(dataq);
	       $.ajax({
				type: "post",
				data : dataq,
				url: url,
				success: function(result) {
					alert(222);
					  $.each(result,function(index,item){
				                 alert(item.ticket) ;
				        });
				}
			});
    };
   	</script>
</head>
<body>
	<input name="token" value="${token}">
	<br><br><br>
	<a href="#" onclick="getTicket()">获取ticket</a>
</body>
</html>